<div id="content">
	<div class="padded">
		<form action="editAlbum" method="post">
			<input type="hidden" name="postID" value="<?=$postID;?>"/>
			<? if ($folders) { ?>
			Generate album from folder:
			<select name="folder">
				<? foreach ($folders as $folder) { ?>
				<option value="<?=$folder;?>"><?=$folder;?></option>
				<? } ?>
			</select>
			<input type="submit" name="generate" value="Generate"/>
			<? } else { ?>
			<input type="submit" name="save" value="Save Album"/>
			<input type="submit" name="delete" value="Delete Album"/>
			<table>
				<tbody>
					<? foreach ($photos as $photo) { ?>
					<tr>
						<td class="padded"><img src="<?=$photo->getThumbPath();?>"/></td>
						<td class="padded"><textarea name="captions[<?=$photo->getPhotoID();?>]" cols="50"><?=$photo->getCaption();?></textarea></td>
					</tr>
					<? } ?>
				</tbody>
			</table>
			<? } ?>
		</form>
	</div>
</div>
